package com.zr.daoimpl;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.zr.dao.UserDao;
import com.zr.model.Cuser;

@Repository("userDao")
public class UserDaoImpl<T> extends  BaseDaoImpl<T> implements UserDao<T> {

	@Override
	public Cuser getUserByUrootAndUpsw(String uroot, String upsw) {
		String hql="from Cuser where uroot=:uroot and upassword=:upsw";
		Query que=this.getCurrentSession().createQuery(hql);
		que.setString("uroot", uroot);
		que.setString("upsw", upsw);
		Cuser user=(Cuser) que.uniqueResult();
		return user;
	}

	
	

}
